(require 'pyim)
(require 'pyim-basedict)

(pyim-basedict-enable)
(setq default-input-method "pyim")
(setq pyim-default-scheme 'xiaohe-shuangpin)

;; 开启拼音搜索功能
(pyim-isearch-mode 1)

;; 使用 pupup-el 来绘制选词框
(setq pyim-page-tooltip 'posframe)

;; 选词框显示5个候选词
(setq pyim-page-length 5)

(global-set-key (kbd "C-\\") 'toggle-input-method)

(add-hook 'emacs-startup-hook
          '(lambda () (pyim-restart-1 t)))

(provide 'damacs-pyim)
